package org.suk.dp.prototype;

import java.text.MessageFormat;

/**
 * Description: 简历<br/>
 * @version V1.0  2017/6/20 17:02  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Resume implements Cloneable{
    private String name;
    private String sex;
    private int age;
    private String timeArea;
    private String company;

    public Resume(String name) {
        this.name = name;
    }

    /**
     * 设置个人信息
     * @param sex
     * @param age
     */
    public void setPersonalInfo(String sex,int age){
        this.sex = sex;
        this.age = age;
    }

    /**
     * 设置工作经历
     * @param timeArea
     * @param company
     */
    public void setWorkExperience(String timeArea,String company){
        this.timeArea = timeArea;
        this.company = company;
    }

    /**
     * 显示
     */
    public void display(){
        System.out.println(MessageFormat.format("{0} {1} {2}",this.name,this.sex,this.age));
        System.out.println(MessageFormat.format("工作经历:{0} {1}",this.timeArea,this.company));
    }

    @Override
    protected Resume clone() {
        Resume resume = null;
        try {
            resume = (Resume)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return resume;
    }
}
